<template>
  <div class="outline-parent">
    <div class="flex-box border-hover-style">
      <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
      </t-image-viewer>
      <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
      </van-image-preview>
      <div class="Showroom-parent" v-if="props.info.digitalShowroom">
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img class="outline-parent-bg" :src="publicUrls + 'free/style17/Level3outlineStyle1.webp'" alt="" />
      <div class="outline">
        <div class="outline-content">
          <div class="outline-title-box">
            <img :src="publicUrls + 'free/style17/Level3outlineStyle1Title1.webp'" alt="" />
            <div class="outline-title" v-html="textType(props.info.text)"></div>
            <img :src="publicUrls + 'free/style17/Level3outlineStyle1Title2.webp'" alt="" />
          </div>
          <p class="outline-subTitle" v-if="props.info.subTitle">{{ props.info.subTitle }}</p>
          <div class="outline-cover" v-if="props.info.value" @click="ImgVisible = true">
            <div class="cover">
              <img :src="urls + props.info.value + '?imageView2/3/format/webp'" alt="" />
            </div>
          </div>
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :title="props.info.text"
            :infoData="props.info"
            :row="props.info.value ? 2 : 7"
          ></TextMax>
        </div>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free17Style1',
});
</script>

<script setup lang="ts">
import { publicUrls, textType } from '@/utils/minxin';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style17.vue';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-right: 140px;
  margin-left: 40px;
}
.Showroom-parent {
  position: absolute;
  top: 10px;
  right: 42%;
  transform: translateX(-42%);
  z-index: 21;
}
.flex-box {
  width: 566px;
  height: 684px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  position: relative;
  padding: 110px 179px 123px 129px;
  z-index: 20;
  overflow: hidden;
}

.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.outline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 22;
}
.outline-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.outline-title-box {
  width: 100%;
  height: auto;
  margin: 10px 0;
  img {
    width: 161px;
    height: 12px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }
  .outline-title {
    margin: 4px 0;
    ::v-deep p {
      color: #7f1a10;
      text-align: center;
      font-family: 'SJxingkai-C';
      font-size: 20px;
      line-height: 24px;
    }
  }
}
.outline-subTitle {
  width: 100%;
  color: rgba(116, 22, 21, 0.8);
  text-align: center;
  font-family: 'PingFang SC';
  font-size: 17px;
  line-height: 28px;
  text-align: center;
  margin-bottom: 10px;
}
.outline-cover {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 100%;
  border: 1px solid rgba(210, 51, 49, 0.1);
  padding: 4px;
  .cover {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 100%;
    padding: 6px;
    background: linear-gradient(180deg, rgba(210, 51, 49, 0.3) 0%, rgba(210, 51, 49, 0) 100%);
    border: 1px solid rgba(210, 51, 49, 0.2);
    &:hover img {
      transform: scale(1.2);
    }
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      overflow: hidden;
      border-radius: 100%;
      transition: all 0.3s ease;
    }
  }
}
.outlineMargin {
  margin-top: 10px;
  margin-bottom: 0 !important;
}

::v-deep .van-text-ellipsis {
  text-align: justify;
  font-family: PingFang SC !important;
  font-size: 16px !important;
  line-height: 30px !important;
  color: rgba(116, 22, 21, 0.8) !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: rgba(116, 22, 21, 1) !important;
  font-weight: 600 !important;
  font-family: 'PingFangSC';
}
</style>